home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / tools4c.arc / REFMAN.TXT < prev    next >
Text File  |  1988-12-27  |  52KB  |  1,300 lines

  1.  
  2.  
  3.  
  4.                                                                       
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.                                 TOOLS FOR C
  12.                       Application Development Package
  13.                                  FUNCTION
  14.                              REFERENCE MANUAL
  15.  
  16.  
  17.                      Shareware Distribution Version 1.0
  18.  
  19.  
  20.  
  21.  
  22.  
  23.          This version of TOOLS FOR C and it's associated manuals and
  24.          support files may be freely copied and distributed as long as
  25.          it is distributed in it's entirety and no fees other than
  26.          nominal handling fees are charged.  The routines in this
  27.          library are NOT Public Domain.  This is copyrighted material. 
  28.          The intent behind distributing this version of TOOLS FOR C is
  29.          to allow you to use the package on a trial basis and determine
  30.          if it meets your needs.  If you find yourself using this
  31.          package, you MUST register by sending $45.00 to the address
  32.          listed below.  Upon receipt of your registration fee we will
  33.          send you an expanded manual, compiled libraries for all of the
  34.          memory models available with your compiler, and the complete
  35.          source code to the library. In NO EVENT may you use any of the
  36.          routines in TOOLS FOR C for commercial purposes until you
  37.          register your copy.  We feel that you will find the value of
  38.          TOOLS FOR C far exceeds the registration fee and we at BP
  39.          SOFTWARE SOLUTIONS, INC. thank you in advance for your
  40.          support.
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.                         BP Software Solutions, Inc.
  49.                         642 N. Commodore Drive
  50.                         Plantation, Fl.  33325
  51.  
  52.  
  53.  
  54.  
  55.  
  56.                                           Copyright (C) 1987 
  57.                                                 BP Software Solutions Inc.
  58.                                                        All Rights Reserved
  59.  
  60.  
  61.  
  62.                                                                      page 2
  63.  
  64.  
  65.                              Table of Contents
  66.  
  67.  
  68.                 Screen and Cursor Control  . . . . . . . .    4
  69.                      cls() . . . . . . . . . . . . . . . .    4
  70.                      cursor()  . . . . . . . . . . . . . .    4
  71.                      curs()  . . . . . . . . . . . . . . .    4
  72.                      get_curs()  . . . . . . . . . . . . .    4
  73.                      get_cursor()  . . . . . . . . . . . .    4
  74.                      cursor_type() . . . . . . . . . . . .    5 
  75.                      normal_cursor() . . . . . . . . . . .    5
  76.                      block_cursor()  . . . . . . . . . . .    5
  77.                      scroll()  . . . . . . . . . . . . . .    5
  78.                 Keyboard Functions . . . . . . . . . . . .    6
  79.                      key() . . . . . . . . . . . . . . . .    6
  80.                      shift_stat()  . . . . . . . . . . . .    6
  81.                      char_waiting()  . . . . . . . . . . .    6
  82.                 Character Output . . . . . . . . . . . . .    7
  83.                      write_a() . . . . . . . . . . . . . .    7
  84.                      write_am()  . . . . . . . . . . . . .    7
  85.                      write_ac()  . . . . . . . . . . . . .    7
  86.                      write_al()  . . . . . . . . . . . . .    7
  87.                      write_tty() . . . . . . . . . . . . .    8
  88.                      write_str() . . . . . . . . . . . . .    8
  89.                      print_string()  . . . . . . . . . . .    8
  90.                      aprintf() . . . . . . . . . . . . . .    8
  91.                 String Functions . . . . . . . . . . . . .    9
  92.                      delete_leading()  . . . . . . . . . .    9
  93.                      del_lead_wht()  . . . . . . . . . . .    9
  94.                      delete_trailing() . . . . . . . . . .    9
  95.                      del_trl_wht() . . . . . . . . . . . .    9
  96.                      right_just_str()  . . . . . . . . . .    9
  97.                      left_just_str() . . . . . . . . . . .   10
  98.                      center_str()  . . . . . . . . . . . .   10
  99.                      insert_str()  . . . . . . . . . . . .   10
  100.                 Video Routines . . . . . . . . . . . . . .   11
  101.                      vid_type()  . . . . . . . . . . . . .   11
  102.                      save_scn()  . . . . . . . . . . . . .   11
  103.                      rest_scn()  . . . . . . . . . . . . .   12
  104.                      video_on()  . . . . . . . . . . . . .   12
  105.                      video_off() . . . . . . . . . . . . .   12
  106.                      change_att()  . . . . . . . . . . . .   12
  107.                      h_line()  . . . . . . . . . . . . . .   13
  108.                      v_line()  . . . . . . . . . . . . . .   13
  109.                      vert_line() . . . . . . . . . . . . .   13
  110.                      shuffle_image() . . . . . . . . . . .   14
  111.                      draw_box()  . . . . . . . . . . . . .   14
  112.                      draw_ex_box() . . . . . . . . . . . .   14
  113.                      fill_area() . . . . . . . . . . . . .   15
  114.                      fill_box()  . . . . . . . . . . . . .   15
  115.                      set_vid_mode()  . . . . . . . . . . .   15
  116.                      get_vid_mode()  . . . . . . . . . . .   15
  117.  
  118.  
  119.                                                                      page 3
  120.  
  121.  
  122.  
  123.                 Window Related Functions . . . . . . . . .   16
  124.                      open_window() . . . . . . . . . . . .   16
  125.                      open_ex_window()  . . . . . . . . . .   16
  126.                      close_window()  . . . . . . . . . . .   16
  127.                      clear_window()  . . . . . . . . . . .   16
  128.                      activate()  . . . . . . . . . . . . .   17
  129.                      create_window() . . . . . . . . . . .   17
  130.                      title_window()  . . . . . . . . . . .   18
  131.                      clear_wndw_title()  . . . . . . . . .   18
  132.                      scroll_window() . . . . . . . . . . .   18
  133.                      cursor_window() . . . . . . . . . . .   19
  134.                      move_window() . . . . . . . . . . . .   19
  135.                      wprint_string() . . . . . . . . . . .   19
  136.                      wprint_string_att() . . . . . . . . .   19
  137.                      wprintf() . . . . . . . . . . . . . .   20
  138.                      fprint_window() . . . . . . . . . . .   20
  139.                      fill_window() . . . . . . . . . . . .   20
  140.                 Menu Routines  . . . . . . . . . . . . . .   21
  141.                      menu()  . . . . . . . . . . . . . . .   21
  142.                 Data Entry Functions . . . . . . . . . . .   23
  143.                      get_field() . . . . . . . . . . . . .   23
  144.                      edit_field()  . . . . . . . . . . . .   23
  145.                      update_ins_flag() . . . . . . . . . .   24
  146.                 Index  . . . . . . . . . . . . . . . . . .   25
  147.  
  148.  
  149.                                                                      page 4
  150.                            Screen and Cursor Control
  151.  
  152.  
  153.  
  154.       
  155.      FUNCTION NAME: cls() 
  156.       
  157.      SYNOPSIS: void cls(); 
  158.  
  159.      DESCRIPTION: 
  160.           This function clears the screen and homes the cursor. 
  161.  
  162.  
  163.  
  164.  
  165.  
  166.       
  167.      FUNCTION NAME: cursor() 
  168.                     curs()
  169.  
  170.      SYNOPSIS: void cursor(col, row) 
  171.                          int col; 
  172.                          int row; 
  173.                void curs(pos)
  174.                          int pos;
  175.      DESCRIPTION: 
  176.           These functions place the cursor at the specified column and row
  177.           or position.  cursor() places the cursor at the specified col and
  178.           row.  curs() places the cursor at the position specified by the
  179.           int "pos" where the high eight bits of "pos" are the row number
  180.           and the low eight bits are the column number.  This is the same
  181.           encoding returned by get_curs().  In the case of cursor() the
  182.           upper left-hand corner of the screen is 0,0, for curs() it is 0. 
  183.  
  184.  
  185.  
  186.  
  187.  
  188.       
  189.      FUNCTION NAME: get_curs() 
  190.                     get_cursor() 
  191.  
  192.      SYNOPSIS: curs_pos = get_curs( void )
  193.                          int curs_pos;  /* current col, row of cursor */ 
  194.                void get_cursor( col, row );
  195.                          int  *col;     /* pointer to column variable */
  196.                          int  *row;     /* pointer to row variable    */
  197.      DESCRIPTION: 
  198.           These functions return the current position of the cursor.
  199.           get_curs() returns an integer with the high 8-bits set to the row
  200.           number and the low 8-bits set to the Column number.  get_cursor()
  201.           places the current column and row position into the integer
  202.           variables pointed to by col and row. 
  203.  
  204.  
  205.                                                                      page 5
  206.  
  207.  
  208.      FUNCTION NAME: cursor_type()
  209.  
  210.      SYNOPSIS: void cursor_type( curs_num )
  211.                          int curs_num;    /* type code of desired cursor */
  212.      DESCRIPTION:
  213.           cursor_type() changes the hardware cursor size and shape to one
  214.           of nine predefined cursors as selected by the parameter curs_num.
  215.           The cursor is smallest when cur_num == 1 and grows steadily
  216.           larger until it reaches the size of a full character block at
  217.           curs_num == 8.  In the special case of curs_num == 0, the cursor
  218.           is blanked.  
  219.                           
  220.  
  221.  
  222.  
  223.  
  224.  
  225.      FUNCTION NAME: normal_cursor()
  226.                     block_cursor()
  227.  
  228.      SYNOPSIS: void normal_cursor( void )
  229.                void block_cursor( void )
  230.  
  231.      DESCRIPTION:
  232.           These cursor shape control functions set the cursor to
  233.           either a normal two bottom scan line cursor or a block
  234.           occupying the full character position.
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.      FUNCTION NAME: scroll()
  243.  
  244.      SYNOPSIS: void scroll(u_col,u_row,l_col,l_row,lines,dir,attr);
  245.                          int u_col;        /*  upper col                 */
  246.                          int u_row;        /*  upper row                 */ 
  247.                          int l_col;        /*  lower col                 */ 
  248.                          int l_row;        /*  lower row                 */ 
  249.                          int lines;        /*  number of lines to scroll */ 
  250.                          int dir;          /*  direction to scroll       */ 
  251.                          int attr;         /*  attribute                 */ 
  252.      DESCRIPTION: 
  253.           This function scrolls a region of the screen using the specified
  254.           video attribute.  Lines refers to the number of lines to scroll. 
  255.           If "lines" equals zero,  then the screen will clear using 'blank'
  256.           characters (spaces) with the specified video attribute.  The 
  257.           direction is specified with either 0=up or 1=down. 
  258.  
  259.  
  260.  
  261.                                                                      page 6
  262.                            Keyboard Functions
  263.  
  264.  
  265.      FUNCTION NAME: key()
  266.  
  267.      SYNOPSIS: ret_code = key( void );
  268.                             int  ret_code;  /* integer return key code  */
  269.      DESCRIPTION:  
  270.           Returns the next character in the keystroke buffer.  If the buffer
  271.           is empty, the routine waits for the next keystroke.  If the key is
  272.           one of the normal ascii characters, it returns that integer value.
  273.           If it is one of the extended keycodes ( function keys, cursor
  274.           keys, etc. ), the high eight bits of the return integer contains
  275.           the scan code for that key and the low eight bits contain zero. 
  276.           KEY.H defines integer values to uniquely define most of the keys
  277.           on an IBM compatible keyboard.
  278.  
  279.      RETURNS:
  280.           An integer key_code.
  281.  
  282.  
  283.  
  284.  
  285.  
  286.      FUNCTION NAME: shift_stat()
  287.  
  288.      SYNOPSIS: ret_code = shift_stat( void )
  289.                             int  ret_code;  /* integer status code  */
  290.      DESCRIPTION:
  291.           keybd_stat() returns and integer value with the current shift
  292.           status of the keyboard as reported by the BIOS Get Shift Status
  293.           function (INT 16 H, service 2).  The status of various keys can
  294.           be determined by decoding the individual bits of the returned
  295.           integer value as follows.
  296.                         bit 0 == 1;  Right Shift key depressed 
  297.                         bit 1 == 1;  Left Shift key depressed
  298.                         bit 2 == 1;  Control key depressed
  299.                         bit 3 == 1;  Alt key depressed
  300.                         bit 4 == 1;  Scroll Lock is active
  301.                         bit 5 == 1;  Num Lock is active
  302.                         bit 6 == 1;  Caps Lock is active
  303.                         bit 7 == 1;  Insert State is active
  304.  
  305.  
  306.  
  307.  
  308.  
  309.      FUNCTION NAME: char_waiting()
  310.  
  311.      SYNOPSIS: ret_code = char_waiting( void )
  312.                             int  ret_code;  /* TRUE or FALSE  */
  313.      DESCRIPTION:
  314.           Returns TRUE (1) if a character is waiting in the keyboard
  315.           buffer or FALSE (0) if not.
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.                                                                      page 7
  323.                                 Character Output
  324.  
  325.  
  326.      FUNCTION NAME: write_a()
  327.  
  328.      SYNOPSIS: void write_a(ch,att) 
  329.                          char ch; 
  330.                          int  att; 
  331.      DESCRIPTION:
  332.           This function writes a character using a specified video attribute
  333.           at the current cursor location.  The cursor is not moved. 
  334.  
  335.  
  336.  
  337.  
  338.       
  339.      FUNCTION NAME: write_am()
  340.  
  341.      SYNOPSIS: void write_am(ch,att,count); 
  342.                          char ch; 
  343.                          int  att; 
  344.                          int  count; 
  345.      DESCRIPTION: 
  346.           This function writes multiple characters to the screen with a
  347.           specified video attribute. This function is designed to write
  348.           characters to the current row only. If the count is greater than
  349.           the remaining spaces on that row, the results may be
  350.           unpredictable. If the count is 'zero' (0) no characters will be
  351.           written. 
  352.  
  353.  
  354.  
  355.      FUNCTION NAME: write_ac()
  356.  
  357.      SYNOPSIS: void write_ac( ch, att )
  358.                          char ch;
  359.                          int  att;
  360.      DESCRIPTION: 
  361.           This function writes a character with specified attribute and
  362.           advances the cursor one position, wrapping to a new line if
  363.           needed.  The screen will not scroll, however, and the cursor will
  364.           not advance past the last position of line 25.
  365.  
  366.       
  367.  
  368.  
  369.      FUNCTION NAME: write_al()
  370.  
  371.      SYNOPSIS: void write_al(col, row, attr, ch); 
  372.                          int col; 
  373.                          int row; 
  374.                          int attr; 
  375.                          char ch;
  376.      DESCRIPTION: 
  377.           This function writes a character with the specified attribute at
  378.           the specified location. The location of the cursor makes no
  379.           difference as it is not checked or used by this routine.  
  380.  
  381.  
  382.                                                                      page 8
  383.  
  384.      FUNCTION NAME: write_tty()
  385.  
  386.      SYNOPSIS: void write_tty( ch );
  387.                          char ch; 
  388.      DESCRIPTION: 
  389.           This function writes a specified character to the screen using the
  390.           bios function "write character as TTY".  No attribute is written
  391.           with the character, however, the cursor is advanced. This function
  392.           recognizes the 'Bell', 'Backspace', 'Return' &  'Line-Feed' ascii
  393.           characters. 
  394.  
  395.  
  396.  
  397.  
  398.      FUNCTION NAME: write_str()
  399.  
  400.      SYNOPSIS: void write_str(col,row,string,att) 
  401.                          int col,row;
  402.                          char *string;
  403.                          int att;
  404.      DESCRIPTION: 
  405.           Writes a string to specified location on the screen using the
  406.           specified attribute. The position of the cursor is of no
  407.           importance as it is not used or moved by this function.  Lines
  408.           will wrap to the next line if one is available. The screen will
  409.           not scroll at the end of the last line.  If you attempt to write
  410.           past the end of the last line, those characters are lost.
  411.  
  412.  
  413.  
  414.  
  415.      FUNCTION NAME: print_string()
  416.  
  417.      SYNOPSIS: void print_string( string,att )
  418.                          char *string;
  419.                          int att;
  420.      DESCRIPTION: 
  421.           This function prints a string with a given attribute beginning at
  422.           the current cursor position. The '\n', '\t', and '\r' characters
  423.           are supported. The string wraps at the end of the line and scrolls
  424.           at the end of the screen. The cursor is left positioned one
  425.           character to the right of the last character in the string.
  426.  
  427.  
  428.  
  429.  
  430.      FUNCTION NAME: aprintf()
  431.  
  432.      SYNOPSIS: void aprintf(att, string, arg(s)...);
  433.  
  434.      DESCRIPTION:  
  435.           This routine prints a string and expands all arguments, exactly
  436.           like printf, and writes the string to the screen starting at the
  437.           current cursor position using the supplied attribute "att".
  438.  
  439.  
  440.  
  441.                                                                      page 9
  442.                                String Functions 
  443.  
  444.  
  445.      FUNCTION NAME: delete_leading()
  446.                     del_lead_wht()
  447.  
  448.      SYNOPSIS: void delete_leading(str)
  449.                          char *str;
  450.                void del_lead_wht(str)
  451.                          char *str;
  452.  
  453.      DESCRIPTION:
  454.           These routines remove any leading white space or control
  455.           characters from a string.  In the case of del_lead_wht() any space
  456.           or tab characters are deleted from the front of a string until the
  457.           first non space/tab is reached. del_leading() does the same for
  458.           any character with an ascii value below 21h.
  459.  
  460.  
  461.  
  462.  
  463.  
  464.      FUNCTION NAME: delete_trailing()
  465.                     del_trl_wht()
  466.  
  467.  
  468.      SYNOPSIS: void delete_trailing(str)
  469.                          char *str;
  470.                void del_trl_wht(str)
  471.                          char *str;
  472.      DESCRIPTION:
  473.           These functions remove any white space or control codes from the
  474.           end of a string.  del_trl_wht() removes any space or tab
  475.           characters from the end of a string until a non space/tab is
  476.           reached.  delete_trailing() does the same for any character below
  477.           ascii 21h.
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.      FUNCTION NAME: right_just_str()
  485.  
  486.      SYNOPSIS: void right_just_str(text,outbuffer,width)
  487.                          char *text;
  488.                          char *outbuffer;
  489.                          int  width;
  490.      DESCRIPTION: 
  491.           Pads the output string with spaces and copies the text string to
  492.           the output buffer so that the end of the text winds up at end of
  493.           the output string.  If the text string is longer than the
  494.           specified width, the text is truncated to fit.  The output buffer
  495.           must be at least one character longer than "width" to allow for
  496.           the null byte at the end of the string.
  497.  
  498.  
  499.                                                                      page 10
  500.  
  501.  
  502.  
  503.      FUNCTION NAME: left_just_str()
  504.  
  505.      SYNOPSIS: void left_just_str(text,outbuffer,width)
  506.                          char *text;
  507.                          char *outbuffer;
  508.                          int  width;
  509.      DESCRIPTION:  
  510.           Pads spaces to the end of a string to the specified width. If the
  511.           string already is as long as or longer than the specified width,
  512.           the string is truncated to that width.  The output buffer must be
  513.           at least one character longer than "width" to allow for the null
  514.           byte at the end of the string.
  515.  
  516.  
  517.  
  518.  
  519.  
  520.      FUNCTION NAME: center_str()
  521.  
  522.      SYNOPSIS: void center_str(text,outbuffer,width)
  523.                          char *text;
  524.                          char *outbuffer;
  525.                          int  width;
  526.      DESCRIPTION:
  527.           Produces a string in "outbuffer" with the specified text string
  528.           centered between enough spaces to make the output string length
  529.           equal to "width"(excluding the null byte).  If the text string
  530.           length is longer than the specified width, then the text is
  531.           truncated to fill the buffer.  The output buffer is assumed to
  532.           be long enough to hold the centered string.  If the string is to
  533.           be centered between an odd number of characters, the extra
  534.           character is placed at the end of the string.
  535.  
  536.  
  537.  
  538.  
  539.  
  540.      FUNCTION NAME: insert_str()
  541.  
  542.      SYNOPSIS: int insert_str( text1, text2, out_buffer, n)
  543.                          char *text1;
  544.                          char *text2;
  545.                          char *out_buffer;
  546.                          int  n;
  547.      DESCRIPTION:
  548.           Inserts text2 into text1 immediately following the n'th
  549.           character of text1, depositing the combined string in
  550.           "out_buffer". It is the  caller's responsibility to ensure that
  551.           the output buffer is large enough.  This function returns the
  552.           combined length of the result string.  If text1 is shorter than
  553.           n, text2 is concatenated to text1.
  554.  
  555.  
  556.                                                                      page 11
  557.  
  558.                                  Video Routines
  559.  
  560.  
  561.  
  562.  
  563.      FUNCTION NAME: vid_type()
  564.  
  565.      SYNOPSIS: ret_code = vid_type( void )
  566.                         int  ret_code;
  567.  
  568.      DESCRIPTION:
  569.           This is the routine used to determine the current video
  570.           configuration of the machine.  It checks the current video mode
  571.           to determine if it is 2, 3, or 7.  If the current mode is 7
  572.           (Monochrome), then the global variables reflecting the present
  573.           screen configuration are left set for a monochrome card.  If the
  574.           mode is 2 (BW80) or 3 (CO80), the variables are set to reflect a
  575.           CGA card.  The "_color" variable is only set if the current mode
  576.           is 3.  The function normally returns OK (zero). If any mode other
  577.           than 2, 3, or 7 is set, the function returns ERROR (-1).
  578.  
  579.  
  580.  
  581.  
  582.  
  583.      FUNCTION NAME: save_scn()
  584.  
  585.      SYNOPSIS: void save_scn(ucol, urow, lcol, lrow, buff_address) 
  586.                          int  ucol;
  587.                          int  urow;
  588.                          int  lcol;
  589.                          int  lrow;
  590.                          char *buff_address;
  591.      DESCRIPTION:  
  592.           This routine saves the portion of the screen defined by the
  593.           boundary variables to the buffer pointed to by buff_address.  No
  594.           checking is or can be done to ensure that the buffer is big
  595.           enough.  vid_type() must be called at least once before calling
  596.           this function to properly set the global variables which tell it 
  597.           where the screen buffer is and whether or not to wait for retrace.
  598.  
  599.  
  600.  
  601.                                                                      page 12
  602.  
  603.      FUNCTION NAME: rest_scn()
  604.  
  605.      SYNOPSIS: void rest_scn(ucol, urow, lcol, lrow, buff_address) 
  606.                          int  ucol;
  607.                          int  urow;
  608.                          int  lcol;
  609.                          int  lrow;
  610.                          char *buff_address;
  611.      DESCRIPTION:  
  612.           This  routine is the opposite of save_scn().  It takes a
  613.           previously saved screen image and returns it to the specified
  614.           location.  As in save_scn, vid_type must be called at least once
  615.           before calling this routine.
  616.  
  617.  
  618.  
  619.  
  620.  
  621.      FUNCTION NAME:      video_on()
  622.                          video_off()
  623.  
  624.      SYNOPSIS: void video_on( void );
  625.                void video_off( void );
  626.  
  627.      DESCRIPTION:
  628.  
  629.           These two functions turn the video on and off on a Color Graphics
  630.           card to allow writing to the screen without snow.  If the mode is
  631.           set for a Monochrome card, they simply return and no action is
  632.           taken. vid_type() must be called at least once before calling
  633.           either of these routines to determine what mode is presently set.
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.      FUNCTION NAME: change_att()
  641.  
  642.      SYNOPSIS: old_att = change_att(col,row,len,att)
  643.                          int old_att; /* old attribute at start location  */
  644.                          int col;     /* start column                     */
  645.                          int row;     /*  start row                       */
  646.                          int len;     /*  number of characters to change  */
  647.                          int att;     /*  new attribute                   */
  648.      DESCRIPTION:  
  649.           Changes the video attribute, starting at the specified col and
  650.           row, for the number of characters "len".  It returns the attribute
  651.           byte found at the starting point.
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.                                                                      page 13
  659.  
  660.      FUNCTION NAME: h_line()
  661.  
  662.      SYNOPSIS: void h_line(col, row, attr, char, int count);
  663.                          int  col;      /* start column               */
  664.                          int  row;      /* start row                  */
  665.                          int  attr;     /* display attribute          */
  666.                          int  char;     /* line character             */
  667.                          int  count;    /* line length                */
  668.      DESCRIPTION: 
  669.           Writes multiple copies of the character using the attribute
  670.           specified.  They will wrap to the next line if necessary.  If the
  671.           count is zero, no characters are written.
  672.  
  673.  
  674.  
  675.      FUNCTION NAME: v_line()
  676.  
  677.      SYNOPSIS: void v_line( col, row, attr, char,  number);
  678.                          int  col;      /* start column               */
  679.                          int  row;      /* start row                  */
  680.                          int  attr;     /* display attribute          */
  681.                          int  char;     /* line character             */
  682.                          int  count;    /* line length                */
  683.      DESCRIPTION:  
  684.           Draws a vertical line starting at col, row, down "number" of
  685.           characters using attribute "attr".
  686.       
  687.  
  688.  
  689.  
  690.  
  691.  
  692.      FUNCTION NAME: vert_line()
  693.  
  694.      SYNOPSIS: void vert_line(char,attr,count);
  695.                          int  char;  /* char to use for vertical line */
  696.                          int  attr;  /* display attribute of line     */
  697.                          int  count; /* length of line                */
  698.      DESCRIPTION:
  699.           Draws a vertical line starting at the current cursor position,
  700.           down the "count" number of characters, using the specified
  701.           character and display attribute. 
  702.  
  703.  
  704.                                                                      page 14
  705.  
  706.      FUNCTION NAME: shuffle_image()
  707.  
  708.      SYNOPSIS: void shuffle_image(pointer,temp)
  709.                          WNDW *pointer;
  710.                          char *temp;
  711.      DESCRIPTION:
  712.           Takes a pointer to a window and a pointer to a temporary storage
  713.           area as arguments.  The storage area must be as large as the
  714.           window's image buffer.  The routine stores the present screen
  715.           image at the window location in the window's image buffer and puts
  716.           the old contents of the image buffer back on the screen.  This
  717.           routine is called by activate() to bring an overlaid window to the
  718.           top.
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.      FUNCTION NAME: draw_box()
  727.                     draw_ex_box()
  728.  
  729.      SYNOPSIS: void draw_box(lcol,urow,rcol,lrow,box,linea,filla)
  730.                          int  lcol;     /* left column                */
  731.                          int  urow;     /* upper row                  */
  732.                          int  rcol;     /* right column               */
  733.                          int  lrow;     /* lower row                  */
  734.                          WNDW *box;     /* pointer to window structure*/
  735.                          int  linea;    /* border video attribute     */
  736.                          int  filla;    /* fill video attribute       */
  737.  
  738.                void draw_ex_box(lcol,urow,rcol,lrow,box,linea,filla,speed)
  739.                          int  lcol;     /* left column                */
  740.                          int  urow;     /* upper row                  */
  741.                          int  rcol;     /* right column               */
  742.                          int  lrow;     /* lower row                  */
  743.                          WNDW *box;     /* pointer to window structure*/
  744.                          int  linea;    /* border video attribute     */
  745.                          int  filla;    /* fill video attribute       */
  746.                          int  speed;    /* exploding box drawing speed*/
  747.      DESCRIPTION:
  748.           These functions draw a box on the screen.  draw_box() simply draws
  749.           the box on the screen while draw_ex_box() repetitively draws
  750.           bigger and bigger boxes, starting at the apparent center of the
  751.           box expanding outwards until the final box size is achieved. No
  752.           screen saving is done here. Both routines take as arguments the
  753.           upper left and lower right corner cursor locations, the address of
  754.           a window structure where the correct characters for the border and
  755.           fill can be found, the border attribute and fill character
  756.           attribute.  draw_ex_box() takes another argument, "speed", which
  757.           controls the rate at which the box grows. 0 is the fastest speed,
  758.           16000 is the slowest.
  759.  
  760.  
  761.                                                                      page 15
  762.  
  763.  
  764.      FUNCTION NAME: fill_area()
  765.  
  766.      SYNOPSIS: void fill_area(lcol,urow,rcol,lrow,ch,attr)
  767.                          int  lcol;     /* left column       */
  768.                          int  urow;     /* upper row         */
  769.                          int  rcol;     /* right column      */
  770.                          int  lrow;     /* left row          */
  771.                          int  ch;       /* character to fill */  
  772.                          int  attr;     /* video attribute   */
  773.      DESCRIPTION:
  774.           Quickly fills the rectangular area of the screen defined by the
  775.           parameters with the specified character and video attribute.
  776.  
  777.  
  778.  
  779.  
  780.  
  781.      FUNCTION NAME: fill_box()
  782.  
  783.      SYNOPSIS: void fill_box(lcol,urow,rcol,lrow,ch,attr)
  784.                          int  lcol;     /* left column       */
  785.                          int  urow;     /* upper row         */
  786.                          int  rcol;     /* right column      */
  787.                          int  lrow;     /* left row          */
  788.                          int  ch;       /* character to fill */  
  789.                          int  attr;     /* video attribute   */
  790.      DESCRIPTION:
  791.           Much like fill_area() except that fill_box() fills the interior
  792.           of the box specified by the bounding rows and columns with any
  793.           character and attribute. Please note that the area filled is
  794.           inside, not on, the specified rows and columns.
  795.  
  796.  
  797.  
  798.  
  799.  
  800.      FUNCTION NAME: set_vid_mode()
  801.                     get_vid_mode()
  802.  
  803.      SYNOPSIS: void set_vid_mode( modenum )
  804.                          int  modenum    /* video mode number  */ 
  805.  
  806.                modenum = get_vid_mode( void)
  807.                          int  modenum    /* current video mode */
  808.      DESCRIPTION:
  809.           These routines simply either return the int value of the current
  810.           video mode or change it as specified.
  811.  
  812.  
  813.  
  814.                                                                      page 16
  815.  
  816.                             Window Related Functions
  817.  
  818.  
  819.  
  820.      FUNCTION NAME: open_window()
  821.                     open_ex_window()
  822.  
  823.      SYNOPSIS: int open_window(wind)
  824.                          WNDW *wind;
  825.                int open_ex_window(wind,speed)
  826.                          WNDW *wind;
  827.                          int speed;
  828.      DESCRIPTION:
  829.           Takes a pointer to a window structure as an argument and calls
  830.           create_window().  They then draw the box on the screen and fill it
  831.           using the characters and attributes found in the structure. 
  832.  
  833.           In the case of open_ex_window() the box is drawn in an exploding
  834.           fashion, starting at the center of the box, growing outward to
  835.           it's final size. The speed of the growth is determined by the
  836.           variable "speed", with 16,000 being the slowest and 0 the
  837.           fastest.
  838.  
  839.  
  840.  
  841.  
  842.      FUNCTION NAME: close_window()
  843.  
  844.      SYNOPSIS: void close_window(wind)
  845.                          WNDW *wind;
  846.      DESCRIPTION:
  847.           Closes the window pointed to by "wind".  If the window is not the
  848.           active window, it is first activated. Finally memory allocated to
  849.           it's screen buffer is then freed.  Attempting to close a window
  850.           that is not open will most likely crash the system.  As a matter
  851.           of fact, you can count on it!
  852.  
  853.  
  854.  
  855.  
  856.  
  857.      FUNCTION NAME: clear_window()
  858.  
  859.      SYNOPSIS: void clear_window( void )
  860.  
  861.      DESCRIPTION: 
  862.           Clears the active window as cls() would do for the entire
  863.           screen.  The cursor position is not affected, however.
  864.  
  865.  
  866.  
  867.                                                                      page 17
  868.  
  869.  
  870.  
  871.  
  872.  
  873.      FUNCTION NAME: activate()
  874.  
  875.      SYNOPSIS: void activate(wind)
  876.                          WNDW *wind;
  877.      DESCRIPTION:
  878.           Checks to see if "wind" is currently the active window.  If it is
  879.           not, it is made the active window, overlying any other windows
  880.           which may have been overlaying it. Upon leaving activate_wind(),
  881.           the doubly linked list of open_windows is updated so that "wind"
  882.           is last and the global "last_wndw" points to it.
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.      FUNCTION NAME: create_window()
  890.  
  891.      SYNOPSIS: ret_code = create_window(new_window)
  892.                          WNDW *new_window;   /* window pointer        */
  893.                          int  ret_code;      /* OK or ERROR           */
  894.      DESCRIPTION:
  895.           Is called by open_window() or open_ex_window().  It calculates
  896.           the size of the image buffer and allocates memory for it. It then
  897.           adds the new window to the end of the doubly linked list of open
  898.           windows and saves the image at the window position.  The
  899.           structure variables for image size, image buffer pointer,
  900.           previous and next windows are updated here.  Nothing is drawn on
  901.           the screen in this routine. 
  902.  
  903.      RETURNS:
  904.           ERROR (-1) if malloc is unable to allocate the storage for the
  905.           image buffer, otherwise, OK (zero).
  906.  
  907.  
  908.  
  909.                                                                      page 18
  910.      FUNCTION NAME: title_window()
  911.  
  912.      SYNOPSIS: void title_window(window,string,attr,just_code)
  913.                          WNDW *window;       /* pointer to window     */
  914.                          char *string;       /* pointer to title text */
  915.                          int  attr;          /* text display attribute*/
  916.                          int  just_code;     /* justification code    */
  917.      DESCRIPTION: 
  918.           Prints the string to the top of the specified window using the
  919.           supplied attribute. The justification code is as follows...
  920.  
  921.           1 == Top-Left;      2 == Top-Center;    3 == Top-Right;
  922.           4 == Bottom Left;   5 == Bottom Center; 6 == Bottom Right;
  923.  
  924.           e.g. If the code is ONE, the string is left justified.  If it is
  925.           TWO, the string is right justified, etc.  Strings longer than the
  926.           window length minus two characters are truncated. The window is
  927.           activated if it is not already active.
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.      FUNCTION NAME: clear_wndw_title()
  935.  
  936.      SYNOPSIS: void clear_wndw_title(window,row)
  937.                          WNDW *window;       /* window pointer        */
  938.                          int  row;           /* upper or lower row    */
  939.      DESCRIPTION: 
  940.           Redraws the top or bottom of the specified window with the default
  941.           border chars and attr for that window.  The window is activated if
  942.           it is not already active. "row" is decoded as follows:
  943.                0 == Top-Row;
  944.                1 == Bottom-Row;
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.      FUNCTION NAME: scroll_window()
  952.  
  953.      SYNOPSIS: void scroll_window(num,dir)
  954.                          int  num;      /* number of lines to scroll  */
  955.                          int  dir;      /* direction of scroll        */
  956.      DESCRIPTION: 
  957.           scrolls the active window "num" lines in direction "dir" where:
  958.                dir == 0,  scroll up;
  959.                dir == 1,  scroll down;
  960.  
  961.  
  962.  
  963.                                                                      page 19
  964.      FUNCTION NAME: cursor_window()
  965.  
  966.      SYNOPSIS: void cursor_window(col,row)
  967.                          int  col;
  968.                          int  row;
  969.      DESCRIPTION:
  970.           Moves the cursor to the specified column and row relative to the
  971.           window.  0,0 is the upper left hand corner of the window, just
  972.           inside the border.  If a row or col argument is specified which is
  973.           larger than the number of rows or columns in the window, that row
  974.           or column position is set to the maximum value which will keep the
  975.           cursor just inside the window border.
  976.  
  977.  
  978.  
  979.  
  980.  
  981.      FUNCTION NAME: move_window()
  982.  
  983.      SYNOPSIS: void move_window(window,direction,count)
  984.                          WNDW *window;
  985.                          int  direction;
  986.                          int count;
  987.      DESCRIPTION: 
  988.           Moves the window "count" spaces in the direction indicated, where
  989.                  1 = LEFT
  990.                  2 = UP
  991.                  3 = RIGHT
  992.                  4 = DOWN
  993.           If the "count" argument is greater than the number of spaces
  994.           available on the screen, the window is only moved the number of
  995.           spaces where all of the window will still be displayed.
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.      FUNCTION NAME: wprint_string()
  1002.                     wprint_string_att()
  1003.  
  1004.      SYNOPSIS: void wprint_string( string )
  1005.                          char *string;
  1006.                void wprint_string_att( string,att )
  1007.                          char *string;
  1008.                          int att;
  1009.      DESCRIPTION:
  1010.           wprint_string() writes a string to the currently active window
  1011.           using that window's fill attribute as it's attribute.  Lines wrap
  1012.           at the window border, and scroll on the last line. The characters
  1013.           '\n', '\t', and '\r' are supported.
  1014.  
  1015.           wprint_string_att() is identical, except that the specified
  1016.           attribute is used instead of the window's fill attribute.
  1017.  
  1018.           These routines are significantly faster than wprintf()
  1019.  
  1020.  
  1021.                                                                      page 20
  1022.  
  1023.      FUNCTION NAME: wprintf()
  1024.  
  1025.      SYNOPSIS: char_num = wprintf( control, arg(s);
  1026.                          char *control;
  1027.                          indeterminate arg(s);
  1028.                          int char_num;
  1029.      DESCRIPTION: 
  1030.           Formats a printf type string with a variable number of arguments
  1031.           and  writes it to the currently  active window.  The formatted
  1032.           sting is stored in a 256 byte global buffer "temp_str".  There is
  1033.           no checking to see if the returned string exceeds this value. 
  1034.  
  1035.      RETURNS:
  1036.           An integer value set to the number of characters in the formatted
  1037.           string.
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.      FUNCTION NAME: fprint_window()
  1045.  
  1046.      SYNOPSIS: void fprint_window(window, text, arg1, ...)
  1047.                          WNDW *window;       /* window pointer        */
  1048.                          char *text;         /* text spring pointer   */
  1049.                          indeterminate arg1; /* beginning of argument */
  1050.                                              /* list, if any          */
  1051.      DESCRIPTION:  
  1052.           Much like wprintf, except that instead of writing to the
  1053.           currently active window, any open window can be specified.  That
  1054.           window is then activated if it is not already the active window.
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.      FUNCTION NAME: fill_window()
  1062.  
  1063.      SYNOPSIS: fill_window( wind_ptr )
  1064.                          WNDW *wind_ptr;
  1065.  
  1066.      DESCRIPTION:
  1067.           Quickly fills the interior of the window using the fill character
  1068.           and fill attribute defined in the window structure.
  1069.  
  1070.  
  1071.  
  1072.                                                                      page 21
  1073.                                  Menu Routines
  1074.  
  1075.  
  1076.      FUNCTION NAME: menu()
  1077.  
  1078.      SYNOPSIS: ret_val = menu(menu_ptr)
  1079.                          MENU *menu_ptr;     /* pointer to menu struct*/
  1080.                          int  ret_val;       /* OK or ERROR           */
  1081.      DESCRIPTION:
  1082.  
  1083.           Only one parameter is required to execute a menu, a pointer to a
  1084.           struct MENU.  This structure contains, or points to, all of the
  1085.           information necessary to open a menu window, make a selection,
  1086.           then run the appropriate program or routine.  Error handling and
  1087.           context sensitive help are included.
  1088.  
  1089.           Struct MENU contains pointers to a window structure, a window
  1090.           title text string, and a screen writing function.  It also
  1091.           contains integer values for default video attributes, a menu
  1092.           cursor type code, and a window title justification code.  These
  1093.           items define the menu's video display.  The function pointers to
  1094.           help and error functions, and the integer values for the exit and
  1095.           help hot keys define the menu's behavior.  The last two items, a
  1096.           pointer to the first structure in an array of SEL structures and
  1097.           the number of SELs in the array, define the individual menu
  1098.           selections.
  1099.  
  1100.           Struct SEL contains a pointer to the selection text. The start
  1101.           column & row where this text will be displayed in the menu window
  1102.           (the position is referenced to the window, not the full screen).
  1103.           Integer values for select and unselect attributes if the default
  1104.           values defined in the MENU structure are not to be used (set to
  1105.           zero to use the defaults). Integer values for 2 activate keys.
  1106.           A pointer to a function to be called or a program to be executed 
  1107.           (one of these must be set to a NULL depending on which is not
  1108.           used).  A pointer to a help function (this must be a NULL pointer
  1109.           if none is provided).  Finally an integer which, if zero,
  1110.           signifies that the menu should be reentered after completion of
  1111.           the selected routine or program.  If non_zero, then the menu is
  1112.           exited and control passes back to the routine which called it.
  1113.           whether the return to the menu or the menu's caller should be
  1114.           executed at the end of the function.  
  1115.  
  1116.           Three types of pseudo cursors are supported. If pcursor_type == 0
  1117.           then the cursor is as long as the selected text string.  If
  1118.           pcursor_type == 1 then the cursor is as long as the longest text
  1119.           string in the selection list.  If pcursor_type == 2 then the
  1120.           cursor is as long as the window is wide.  All sections functions
  1121.           must return an integer value.. this  value should be zero for a
  1122.           normal return and any other value for an error condition.  This
  1123.           integer is passed to the menu's user defined error function where
  1124.           it must be decoded by the programmer.  If the error function is
  1125.           called with a parameter of zero a key stroke error is indicated.
  1126.  
  1127.  
  1128.  
  1129.                                                                      page 22
  1130.  
  1131.  
  1132.  
  1133.           Calling the menu routine is easy.  Setting up all of the
  1134.           necessary structures and arrays of structures, then stuffing them
  1135.           with the appropriate values is not.  We understand how difficult
  1136.           and error prone hand coding the menu structures would be, so we
  1137.           have included in the package MENUGEN.EXE which automates the
  1138.           process.  While using MENUGEN you interactively define the menu
  1139.           on screen.  When complete, MENUGEN writes the control structures
  1140.           to a file which you then include in your source code.  The
  1141.           operation of MENUGEN is covered more thoroughly in it's own
  1142.           section.
  1143.  
  1144.      RETURNS:
  1145.           An int value. OK (zero) or ERROR ( -1)
  1146.  
  1147.  
  1148.  
  1149.                         Listings of typedef MENU and SEL
  1150.  
  1151.  
  1152.      typedef struct MENU { 
  1153.         struct WNDW *menu_window;    /* Pointer to the menu window structure */
  1154.         int   default_non_select_att;/* Usually the same as window fill attr */    
  1155.         int   default_cursor_att;    /* Attribute of items when selected     */ 
  1156.         int   title_format;          /* Position of menu title on border(1-6)*/
  1157.         int   window_title_att;      /* Video attribute of menu title        */
  1158.         char  *window_title_text;    /* Pointer to menu title text string    */
  1159.         int   pcursor_type;          /* Type of selection cursor (0-2)       */
  1160.         int   exit_key;              /* Hot key to exit menu, Usually ESC    */
  1161.         int   help_key;              /* Hot key to call help function, if any*/
  1162.         int   (*menu_text)();        /* Ptr to function to write text to scrn*/
  1163.         int   (*error_fn)();         /* Ptr to user supplied error handler   */
  1164.         struct SEL *sel_list;        /* Ptr to the first in array of SELs    */ 
  1165.         int   num_sel;               /* Number of menu selections            */   
  1166.         }    MENU; 
  1167.     
  1168.      typedef struct SEL{ 
  1169.         char *text;               /* Pointer to item selection text string  */
  1170.         int  start_col;           /* Starting col in window for text string */
  1171.         int  start_row;           /* Starting row in window for text string */
  1172.         int  sel_att;             /* Item sel video attr, Zero for default  */ 
  1173.         int  unsel_att;           /* Item unselected video attribute or Zero*/ 
  1174.         int  activate_key_1;      /* First Activate hot key                 */
  1175.         int  activate_key_2;      /* Second Activate hot key                */
  1176.         int  (*do_function)();    /* Ptr to selected function or NULL       */ 
  1177.         char *exe_call;           /* Ptr to program name string or NULL     */ 
  1178.         int  (*help_function)();  /* Ptr to optional help fctn or NULL      */ 
  1179.         int  exit;                /* exit menu after command, Zero if no    */ 
  1180.         } SEL; 
  1181.  
  1182.  
  1183.  
  1184.                                                                      page 23
  1185.                               Data Entry Functions
  1186.  
  1187.  
  1188.      FUNCTION NAME: get_field()
  1189.  
  1190.      SYNOPSIS: ch = get_field(buffer,length,attr,just_code,under_line)
  1191.                          char *buffer;    /* pointer to data buffer      */
  1192.                          int  length;     /* maximum length of data      */
  1193.                          int  attr;       /* on screen attribute         */
  1194.                          int  just_code;  /* left(0) or right(1) justify */
  1195.                          int  under_line; /* underline(1) field or not(0)*/
  1196.                          int  ch;         /* last keycode as def in key.h*/
  1197.      DESCRIPTION:
  1198.           Gets a string into a data buffer, allowing editing and writing to
  1199.           the screen using attributes.  Left or right justification is
  1200.           supported.  The buffer MUST be length + 1 byte long.
  1201.           Justification codes are 0 = left, 1 = right. The routine exits
  1202.           whenever a keystroke with a return code less than 32 (space) or
  1203.           greater than 256 (as defined in KEY.H) is entered or the cursor
  1204.           reaches the end of the field.
  1205.  
  1206.      RETURNS:
  1207.           It returns a code indicating the last keystroke or a zero if the
  1208.           end of the field was reached.
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.      FUNCTION: edit_field()
  1216.  
  1217.      SYNOPSIS: ch = edit_field(buff,length,attr,underline)
  1218.                          char *buff;         /* storage buffer   */
  1219.                          int  length;        /* field length     */
  1220.                          int  attr;          /* display attribute*/
  1221.                          int  underline;     /* underline code   */
  1222.                          int  ch;            /* last keystroke   */
  1223.      DESCRIPTION:
  1224.           This function is similar to get_field() except that it first
  1225.           displays at the current cursor position the contents of "buff"
  1226.           which can then be edited. Only left justification is supported. 
  1227.  
  1228.      RETURNS:
  1229.           It returns a code indicating the last keystroke or a zero if the
  1230.           end of the field was reached.
  1231.  
  1232.  
  1233.                                                                      page 24
  1234.  
  1235.  
  1236.  
  1237.  
  1238.      FUNCTION NAME: update_ins_flag()
  1239.  
  1240.      SYNOPSIS: void update_ins_flag()
  1241.  
  1242.      DESCRIPTION: 
  1243.           This function is called each time the insert key is pressed while
  1244.           in the get_field() data input function. This one is a null routine
  1245.           which can be replaced by one of your own.  This is useful for
  1246.           doing things like updating an on screen prompt to reflect the
  1247.           current state of the global insert/overwrite flag "insert_flag".
  1248.  
  1249.  
  1250.  
  1251.                                                                      page 25
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.                                 INDEX
  1263.  
  1264.  
  1265.  
  1266.  
  1267.          activate() . . . . . (17)         left_just_str()  . . (10)
  1268.          aprintf()  . . . . . ( 8)         menu() . . . . . . . (21)
  1269.          block_cursor() . . . ( 5)         move_window()  . . . (19)
  1270.          center_str() . . . . (10)         normal_cursor()  . . ( 5)
  1271.          change_att() . . . . (12)         open_ex_window() . . (16)
  1272.          char_waiting() . . . ( 6)         open_window()  . . . (16)
  1273.          clear_window() . . . (14)         print_string() . . . ( 8)
  1274.          clear_wndw_title() . (18)         rest_scn() . . . . . (11)
  1275.          close_window() . . . (16)         right_just_str() . . ( 9)
  1276.          cls()  . . . . . . . ( 4)         save_scn() . . . . . (11)
  1277.          create_window()  . . (17)         scroll() . . . . . . ( 5)
  1278.          curs() . . . . . . . ( 4)         scroll_window()  . . (18)
  1279.          cursor() . . . . . . ( 4)         set_vid_mode() . . . (15)
  1280.          cursor_window()  . . (19)         shift_stat() . . . . ( 6)
  1281.          del_lead_wht() . . . ( 9)         shuffle_image()  . . (14)
  1282.          del_trl_wht()  . . . ( 9)         title_window() . . . (18)
  1283.          delete_leading() . . ( 9)         update_ins_flag()  . (24)
  1284.          delete_trailing()  . ( 9)         v_line() . . . . . . (13)
  1285.          draw_box() . . . . . (14)         vert_line()  . . . . (13)
  1286.          draw_ex_box()  . . . (14)         vid_type() . . . . . (11)
  1287.          edit_field() . . . . (23)         video_off()  . . . . (12)
  1288.          fill_area()  . . . . (15)         video_on() . . . . . (12)
  1289.          fill_box() . . . . . (15)         wprint_string()  . . (19)
  1290.          fill_window()  . . . (20)         wprint_string_att()  (19)
  1291.          fprint_window()  . . (20)         wprintf()  . . . . . (20)
  1292.          get_curs() . . . . . ( 4)         write_a()  . . . . . ( 7)
  1293.          get_cursor() . . . . ( 4)         write_ac() . . . . . ( 7)
  1294.          get_field()  . . . . (23)         write_al() . . . . . ( 7)
  1295.          get_vid_mode() . . . (15)         write_am() . . . . . ( 7)
  1296.          h_line() . . . . . . (12)         write_str()  . . . . ( 8)
  1297.          insert_str() . . . . (10)         write_tty()  . . . . ( 8)
  1298.          key()  . . . . . . . ( 6)
  1299.  
  1300.